<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./node_modules/vue/dist/vue.js"></script>
</head>
<body>
    <div id="app">
      {{birth}}
    </div>
    <script>
        //1.创建Vue实例
        const vm = new Vue({
            el:"#app",
            data:{
                birthday:1126032123201
            },
            computed: {
                birth(){
                    let birth = new Date(this.birthday);
                    return birth.getFullYear()+"-"+birth.getMonth()+"-"+birth.getDay()
                }
            }
        })

    </script>
</body>
</html>